<?php
session_start();
require_once "../funciones.php";
$_SESSION['caweb']['basededatos'] = "caweb";
$_SESSION['caweb']['soporte'] = "mantis12";


    $caweb = con_caweb();
    $sql = "select ubicacion from seriales group by ubicacion";



$tot = 0;
$result = mysql_query($sql);
while($fila = mysql_fetch_array($result)){
    $nit = $fila[ubicacion];
    $mantis = con_mantis();
    $sql = "select * from mantis_project_table where nit = '$nit'";
    $result1 = mysql_query($sql);
    $base = mysql_fetch_array($result1);
    //echo "hola<br />";
    if (!is_array($base)){
        $caweb = con_caweb();
        $sql = "select * from seriales where ubicacion = '$nit'";
        $result2 = mysql_query($sql);
        echo "<h1>Para el Nit $nit</h1>";
        while($mos = mysql_fetch_array($result2)){
            echo $mos[interno]." bodega : ".$mos[bodaga]."<br />";
            $tot ++;
        }
        echo "<hr />";
    }
}
echo "<h1>$tot</h1>";
?>
